<!DOCTYPE html>
<html>
	<!--
		作者：offline
		时间：2018-06-27
		描述：增加薪资规则
	-->

	<head>
		<!-- 引入框架文件 -->
		<link rel="stylesheet" href="../../model/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<script type="text/javascript" src="../../model/jquery-2.1.0.js"></script>
		<script type="text/javascript" src="../../model/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
		<link rel="stylesheet" href="../../static/css/ehr.css" />
		<link rel="stylesheet" href="../../static/css/employee.css" />
		<script type="text/javascript" src="../../model/models.js"></script>
		<style type="text/css">.panel-body form div{margin-top: 15px;}</style>
		<style type="text/css">
			th {
				text-align: center;
			}
		</style>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>

		<div include="../../static/header.htm"></div>
		<div style="height: 100%;float: left;" include="../../static/aside.htm"></div>

		<div class="wire"></div>

		<div class="aside2">
			<div include="../../static/salaryManage.htm"></div>
		</div>

		<div class="section">
			<div style="color: white;font-size: 36px;text-align: center; width: 100%; height: 70px;" class="head"><b>添加薪资</b></div>
			<div class="panel-body">
				<form class="navbar-form navbar-left" role="search" id="submitForm">
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">核算方案名称</span>
						<input type="text" class="form-control" placeholder="" aria-describedby="basic-addon1" name="salaryName">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">生效日期</span>
						<input type="date" class="form-control" value="2018-07-03" aria-describedby="basic-addon4" name="startDate">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">失效日期</span>
						<input type="date" value="2018-07-03" class="form-control" placeholder="" name="endDate">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">所属部门</span>
						<input type="text" class="form-control" placeholder="部门id" name="dept.id">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">备注</span>
						<textarea style="width: 180px;" name="note"></textarea>
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">创建人</span>
						<input type="text" class="form-control" placeholder="创建人id" name="creator.id">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">创建时间</span>
						<input type="text" class="form-control" value="2018-07-03" name="createTime">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">更新人</span>
						<input type="text" class="form-control" placeholder="更新人id" name="updator.id">
					</div>
					<br>
					<div class="input-group">
						<span class="input-group-addon" style="width: 110px;">更新时间</span>
						<input type="text" class="form-control" placeholder="" name="updateTime">
					</div>
					<br>
					<div style="margin-top: 20px;">
						<input type="button" value="提交" onclick="return addSalary();" class="btn btn-default">
						<input type="reset" value="重置" class="btn btn-default">

					</div>
				</form>
			</div>

		</div>
	</body>

</html>

<script>
	
	function addSalary()
	{
		
		var form = new FormData(document.getElementById("submitForm"));
		//ajax刷新页面
		$.ajax({
			type: "post",
			url: "http://localhost:9090/addSalary",
			"data": form,
			processData: false,
			contentType: false,
			"success": function(obj) {
				if(obj.code == 1) {
					var list = obj.data;
					alert("添加成功！");
					
				}
			},
			"dataType": "json",
			async: true
		});
		
	}
	
</script>